package com.tools;

import android.graphics.Bitmap;
import android.graphics.Matrix;

public class Picture {

	public static Bitmap resize(Bitmap origin) {
		float scaleWidth = 0.5f;
		float scaleHeight = 0.5f;

		int width = (int) (origin.getWidth() * scaleWidth);
		int height = (int) (origin.getHeight() * scaleHeight);

		Matrix matrix = new Matrix();
		matrix.postScale(scaleWidth, scaleHeight);

		Bitmap resize_bitmap = Bitmap.createBitmap(origin, 0, 0, width, height,
				matrix, true);
		return resize_bitmap;
	}
}
